</head>
<body>
<div class="f-sep10"></div>
<div class="m-filter s-filter m-form">
	<form id="filter_form">
		会员组：
		<select id="gid" name="gid" onChange="ajaxload()">
			<option value="0">全部会员</option>
			<!--foreach:{$group_list $vo}-->
			<option value="{$vo.gid}">
                  {$vo['name']}	
			</option>
			<!--{/foreach}-->
		</select>
          状态：
          <select id="status" name="status" onChange="ajaxload()">
          	<option value="0">全部</option>
            <option value="1">审核</option>
            <option value="2">未审核</option>
          </select>
		&nbsp;&nbsp;
		&nbsp;&nbsp;
		关键词：
		<input type="text" id="keyword" name="keyword" class="u-ipt u-ipt-3" />
		<button type="button" onClick="ajaxload()" class="u-btn u-btn-sm">搜索</button>
	</form>
</div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
<h2 class="u-tt">会员管理</h2>
	<div class="more"><a href="javascript:;" onClick="ajaxload();"><span class="icon">&#xf021;</span> 刷新</a></div>
    <ul>
        <li><a class="z-crt" href="javascript:;"><span class="icon">&#xf101;</span> 会员列表</a></li>
		<li><a class="opentab" href="<?php echo url('user_list/add') ?>"><span class="icon">&#xf067;</span> 添加会员</a></li>
    </ul>
</div>
<div class="m-list-table">
<table class="m-table m-table-row tablesorter" id="table">
    <thead>
      <tr>
        <th class="cola">ID</th>
        <th>帐号</th>
        <th>昵称</th>
        <th>管理组</th>
        <th>状态</th>
        <th class="cola">操作</th>
      </tr>
      
    </thead>
    <tbody>
    	<!--foreach:{$list $vo}-->
        <tr>
        <td>{$vo.uid}</td>
        <td >{$vo.username} </td>
        <td >{$vo.nicename} </td>
        <td >{$vo.gname} </td>
        <td>
        <!--if:{$vo['status']==1}-->
        启用
        <!--{else}-->
        禁用
        <!--{/if}-->
        </td>
        <td>
        <a class="opentab operating" href="<?php echo url('user_list/edit',array('uid' => $vo['uid'])) ?>" ><span class="icon">&#xf040;</span> 修改</a>
        <a class="operating" href="javascript:vouid(0);" onClick="del('<?php echo url('user_list/del') ?>','{$vo.uid}',this)"><span class="icon">&#xf014;</span> 删除</a>
        
         </td>
      </tr>
        <!--{/foreach}-->
    </tbody>
</table>
</div>
<div class="f-cb"></div>
<div class="g-foot-tool">
<div class="m-page" id="pages"></div>
<div class="f-cb"></div>
<div class="f-sep10" ></div>
<div class="f-sep10"></div>
</div>
</body>
<script>
var page;
var ajaxload = new function(){}; 
var del = new function(){}; 
Do.ready('base','page','tip','dialog', function() {
	page = $("#pages").myPagination({
		pageCount:1,
		ajax: {
			on: true,
			pageCountId:'countpage',
			url: '{$url(user_list/ajax_content_list)}',
			dataType: 'json',
			param:$('#filter_form').serialize(),
			ajaxStart: function() {
				$("#table tbody").html('<tr><td colspan="7"><center>正在加载...请稍候！</center></td></tr>'); 
			},
			callback: function(json) {
				setTimeout(function() {
					$("#table tbody").html(json.info);
				}, 200);
			}
		}
	});
	
	window.ajaxload = function ajaxload(){
		page.onLoad({
			param:$('#filter_form').serialize()
		});
	};
	
	window.del = function del(url,uid,obj) {
		ajaxpost({
		name:'删除此会员会删除会员关联!',
		url:url,
		data:{uid:uid},
		tip:true,
		success:function(){
			$(obj).parent().parent().remove();
			}
		});
	}

});
</script>